This section contains a short lost of commonly used regular expressions that can be used to identify or format data. This list is provided as an introduction to the regular expressions. These and other pattens can be modified to suit your organization's needs.
Note: These common patterns use both symbols and abbreviations.
Type | Pattern | Example |
---|---|---|
Phone number ((xxx) xxx-xxxx format) |
\(\d\d\d\) \d\d\d-?\d\d\d\d | (562) 988-1688 |
Short date (single or double-digit month-day format) |
\d?\d/\d?\d/\d\d\d\d | 12/25/2009 |
Social Security number (xxx-xx-xxxx) |
[0-9]+-[0-9[0-9]-[0-9]+ | 123-45-6789 |
Time (h:mm or hh:mm format) |
[0-9]?[0-9]:[0-9][0-9] | 17:50 |
ZIP code | \d*-?\d* | 90807 |
The following table demonstrates the regular expressions that should be used to retrieve a single line of text from data containing multiple lines of text.
Note: The First Line pattern will not return the desired results when the data being processed only contains a single line of text.
Type | Pattern | Example |
---|---|---|
First Line | {.*?\n} | {.*?\n} |
Second Line | \n\n{.*?\n} | \n\n{.*?\n} |
Additional Lines | For each additional line, prepend the following to the Second Line pattern: \n\n.*? | \n\n.*?\n\n{.*?\n} |
Last Line | Follow the instructions for additional lines, then modify the expression within the braces to match the following: {.*} | \n\n.*?\n\n{.*} |
For further help or feedback, please see the Laserfiche Support Site. | © 2009 Laserfiche. All Rights Reserved. |